<?php
class Controller_Procedure extends Controller_Template
{
	//Constructor
	public function __construct()
	{
		parent::__construct();
		$this->selfModel = new Model_Procedure();
		$this->inventoryModel = new Model_Inventory();
	}
	
	public function index()
	{
		$title = "Procedure";
		$requiredField = '<span class="red">*</span> Required field</br>';
		
		$allProcedures = $this->selfModel->getAllProcedures();
		$allProceduresItems = $this->selfModel->getAllProcedureItems();
		$allInventoryItems = $this->inventoryModel->getAllInventoryItems();
		
		require 'View/header.tpl';
		require 'View/menu.tpl';
		require 'View/procedure/index.tpl';
		require 'View/footer.tpl';
		//return true;
	}
	
	public function selectedProcProcedure($id)
	{
		$title = "Procedure Selection";
		$requiredField = '<span class="red">*</span> Required field</br>';
		
		$allProcedures = $this->selfModel->getAllProcedures();
		$allProceduresItems = $this->selfModel->getAllProcedureItems();
		$allInventoryItems = $this->inventoryModel->getAllInventoryItems();
		$selectedProcId = $id;
		
		require 'View/header.tpl';
		require 'View/menu.tpl';
		require 'View/procedure/index.tpl';
		require 'View/footer.tpl';
		//return false;
	}
}